{
       auhd.pas
        
        Copyright 2008 Tomas Cruz Hernandez <tomas@tomas-laptop>
        
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.
        
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
        
        You should have received a copy of the GNU General Public License
        along with this program; if not, write to the Free Software
        Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
        MA 02110-1301, USA.
}


UNIT uhd;

INTERFACE


IMPLEMENTATION
	VAR 
		hd: array[0..1024] of byte;
		pos_aguja : shortint = 0;
		pos_circular : shortint = 0;
		aguja_abajo: boolean = false;
		
		
	Procedure mover_aguja();
		BEGIN
			pos_aguja := pos_aguja + 1;
		END;
		
	Procedure girar_disco();
		BEGIN
			pos_circular := pos_circular + 1;
		END;
		
	Procedure bajar_aguja();
		BEGIN
			aguja_abajo := True;
		END;
		
	Procedure subir_aguja();
		BEGIN
			aguja_abajo := False;
		END;
	
	Procedure leer(var retorno: byte);
		BEGIN
			if aguja_abajo = True then
				BEGIN
					retorno := hd[pos_circular * pos_aguja];
				END;
		END;
		
		
		
		
BEGIN

END.
